<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Animoso.Domain.LinkItem>>"
    MasterPageFile="~/Views/Shared/MasterPage.Master" %>

<asp:Content runat="server" ID="Content" ContentPlaceHolderID="TitleContent">
    Animoso: LinkItems</asp:Content>
<asp:Content runat="server" ID="Content1" ContentPlaceHolderID="MainContent">
    <table>
        <tr>
            <th>Id</th>
            <th>Text</th>
            <th>Link Text</th>
            <th>Verwijderen</th>
        </tr>
        
        <% foreach (var item in Model)
           { %>
        <tr>
            <td>
                <%= Html.Encode(item.Id) %>
            </td>
            <td>
                <%= Html.ActionLink(Html.Encode(item.Id), "Edit/"+item.Id) %>
            </td>
            <td>
                <%= Html.Encode(item.Text) %>
            </td>
            <td>
                <%= Html.Encode(item.LinkText) %>
            </td>
            <td>
                <%=Html.ActionLink("Verwijder", "Delete/"+item.Id, "LinkItem") %>
            </td>
        </tr>
        <% } %>
    </table>
    <p>
        <%= Html.ActionLink("Nieuw Bericht", "Create") %>
    </p>
</asp:Content>
